package com.sofly.service.impl.group3;

import java.util.List;

import javax.swing.plaf.synth.SynthSpinnerUI;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sofly.dao.group3.IPartsDao;
import com.sofly.entity.Parts;
import com.sofly.service.group3.IPartsService;

/**
 * 
* <p>Title:PurchaseListServiceImpl </p>
* <p>Description: </p>
* <p>Company: </p> 
* @author ChengShiMin
* @date 下午6:55:29
 */
@Service
public class PartsService implements IPartsService {
	
	@Autowired
	private IPartsDao partsDao;

	@Override
	public List<Parts> getPageParts(int page, int size) {
		return partsDao.getPageParts(page, size);
	}

	@Override
	public int getCount() {
		
		return partsDao.getCount();
	}
	
	@Override
	public List<Parts> findPartsParent(String parent) {
		// TODO Auto-generated method stub
		String p = parent.substring(1);
		p = p.substring(0, p.indexOf("-"));
		return partsDao.selectParent(p);
	}
	 

}
